package apj.demo.service.impl;

import java.util.ArrayList;

import apj.demo.factory.DaoFactory;
import apj.demo.model.Department;
import apj.demo.service.DepartmentServiceDao;

public class DepartmentServiceDaoImpl implements DepartmentServiceDao {

	@Override
	public void save(Department department) throws Exception {
		DaoFactory.getDepartmentDaoImp().save(department);
	}

	@Override
	public Department findByID(int id) throws Exception {
		return DaoFactory.getDepartmentDaoImp().findByID(id);
	}

	@Override
	public ArrayList<Department> findByAll() throws Exception {
		return DaoFactory.getDepartmentDaoImp().findByAll();
	}

	@Override
	public void update(Department department) throws Exception {
		// TODO Auto-generated method stub
		DaoFactory.getDepartmentDaoImp().update(department);
	}
}
